package com.zhiche.lisa.lspm.dao.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * 商业关系描述
 * Created by qichao on 2018/7/14.
 */
@TableName("lisa_business_relationship")
public class BusinessRelation extends Model<BusinessRelation> {

    @TableId(value="id", type= IdType.AUTO)
    private Long id;
    /**
     * 上游商户ID
     */
    @TableField("upper_id")
    private Long upperId;
    /**
     * 下游商户ID
     */
    @TableField("supplier_id")
    private Long supplierId;
    /**
     * 创建时间
     */
    @TableField("gmt_create")
    private Date gmtCreate;
    /**
     * 租户ID
     */
    @TableField("tenant_id")
    private Long tenantId;
    /**
     * 创建人
     */
    private String creator;

    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUpperId() {
        return upperId;
    }

    public void setUpperId(Long upperId) {
        this.upperId = upperId;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Override
    public String toString() {
        return "BusinessRelation{" +
                "id=" + id +
                ", upperId=" + upperId +
                ", supplierId=" + supplierId +
                '}';
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
